home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 8638 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: news.tuwien.ac.at!not-for-mail
  2. From: cmack@rainbow.studorg.tuwien.ac.at (Christoph Mack)
  3. Newsgroups: comp.lang.c
  4. Subject: shellscript to c
  5. Date: 5 Mar 1996 16:24:35 GMT
  6. Organization: Aktionsgemeinschaft TU Wien
  7. Message-ID: <4hhps3$cof@news.tuwien.ac.at>
  8. NNTP-Posting-Host: rainbow.studorg.tuwien.ac.at
  9. X-Newsreader: TIN [UNIX 1.3 950515BETA PL0]
  10.  
  11. Hi!
  12.  
  13. I am currently writing a compiler which will be able to translate
  14. bourne shell scripts to C. I hope that this will speed the scripts 
  15. up a bit.
  16.  
  17. The strategie is to do a fork and exec for each unix system call.
  18. One problem is output redirection. Does anyone know how to realize
  19. <sc1> | <sc2> in C where <sc1> and <sc2> are unix system calls?
  20.  
  21. e.g.: ls -lsa | grep vmlinuz
  22.       cat textfile.txt | grep "certain words"
  23.  
  24. thanks in advance
  25.  
  26.     X-toph
  27. -- 
  28.         \|/
  29.        (o o)
  30. --oOOO--(_)--OOOo-------------------------------------------------------
  31. Christoph Rainer MACK
  32. Student at the TECHNICAL UNIVERSITY OF VIENNA
  33. mailto:e9225519@stud1.tuwien.ac.at
  34. http://rainbow.studorg.tuwien.ac.at/~cmack/
  35.    .oooO          They don't make no seatbelts in the minds, so I can't
  36.    (   )   Oooo.  fasten up for this life. (Suicidal Tendencies)
  37. ----\ (----(   )--------------------------------------------------------
  38.      \_)    ) /
  39.            (_/
  40.